//采购申请（增加订单）
import InputComponents from "../InputComponents";
import AddOrderTabList from "./AddOrderTabList";
import AddOrderTabAdd from "./AddOrderTabAdd";
import './AddOrder.css'
const AddOrder = (props) => {

    // 供货商表单的相关数据
    let supplierValue = null;
    const supplierData = [
        { id: 1, value: '后端' },
        { id: 2, value: '前端' },
        { id: 3, value: '美好超市' }
    ]
    const supplier = (a) => {
        supplierValue = a
        return console.log('父组件获取的值：', supplierValue)
    }
    //采购状态下拉框相关数据
    let purchaseStatusValue = null;
    const purchaseStatusData = [
        { id: 1, value: '后端' },
        { id: 2, value: '前端' },
        { id: 3, value: '美好超市' }
    ]
    const purchaseStatus = (a) => {
        purchaseStatusValue = a
        return console.log('父组件获取的值：', purchaseStatusValue)
    }
    return (
        <div className="purchaseStatus">
            {/* <div className="addTop-1 "> 采购申请（增加订单）</div> */}
            <div className="addTop-1 ">基本信息</div>
            <div className="clear addTop-2">
                <div className="addTop-2-Input">
                    供货厂商：<InputComponents InputValue={supplierData} passData={supplier} placeholder='供货商' />
                </div>
                <div className="addTop-2-Input">
                    付款类型 ：<InputComponents InputValue={purchaseStatusData} passData={purchaseStatus} placeholder='全部' />
                </div>
                <div className="addTop-2-Input">
                    审批人： <InputComponents InputValue={purchaseStatusData} passData={purchaseStatus} placeholder='全部' />
                </div>
                <div>
                    采购日期：
                </div>
            </div>
            <div className="addTop-3">选择商品</div>
            <div className="addTop-4">
                <div className="addTop-2-Input">
                    选择品牌 <InputComponents InputValue={purchaseStatusData} passData={purchaseStatus} placeholder='全部' />
                </div>
                <div className="addTop-2-Input">
                    选择分类 <InputComponents InputValue={purchaseStatusData} passData={purchaseStatus} placeholder='全部' />
                </div>
                <div className=" addTop-2-Input">
                    商品标题：<input type="text" className="addTop-2-Input-1" />

                </div>

                <button className="addTop-4-btn" >  搜索</button>

            </div>
            <div className="addTop-5"><span>搜索结果</span></div>
            <AddOrderTabList />
            <div className="addTop-5"><span>商品明细</span></div>
            <AddOrderTabAdd />
            <div>
                <span style={{ width: 30 }}> 商品共：xxx </span>  <span>金额合计</span>
                <button className="addTop-4-btn">提交</button>
            </div>


        </div>
    )


}

export default AddOrder;